<?php


include_once '../core/core.php';
	echo json_encode(['code'=>1,'msg'=>'删除失败！已启用禁止删除！']);
	exit;
if(!isset($_GET['id'])){
		exit('链接错误！');
	}
$id = $_GET['id'];

$sql = 'DELETE FROM `project` WHERE id='.$id;

$res = $db->del($sql);

if($res){
	$sql = 'DELETE FROM `fields` WHERE pid='.$id;
	$res = $db->del($sql);
//	header("Location:".get_host().'/index.html');
echo json_encode(['code'=>0,'msg'=>'删除成功！']);
}else{
//	err('删除失败！');
	echo json_encode(['code'=>1,'msg'=>'删除失败！']);
}







